import unittest,requests

class cangchu(unittest.TestCase):

    #每日检查接口
    #近七日下架数量
    def test_cangchu_01_login(self):
        url='http://10.59.9.32/jeewms/BiController.do?dayCount&reportType=line'
        headers={'cookie':'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        # json={'phone':'admin','pwd':'admin'}
        login=requests.post(url=url,headers=headers)
        print(login.json())

    #下架前五十
    def test_cangchu_02_xia(self):
        url='http://10.59.9.32/jeewms/BiController.do?cpNamedownCount&reportType=column'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        # json = {'phone': 'admin', 'pwd': 'admin'}
        xia=requests.post(url=url,headers=headers)
        print(xia.json())

    #收货未上架
    def test_cangchu_03_wsj(self):
        url='http://10.59.9.32/jeewms/cgReportController.do?datagrid&configId=wm_tuopan'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        wsj=requests.post(url=url,headers=headers)
        print(wsj.json())

    #出货异常
    def test_cangchu_04_yc(self):
        url='http://10.59.9.32/jeewms/cgReportController.do?datagrid&configId=wm_to_down_chayi'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        yc=requests.post(url=url,headers=headers)
        print(yc.json())


    #温度维护
    def test_cangchu_05_wd(self):
        url='http://10.59.9.32/jeewms/cgAutoListController.do?datagrid&configId=wm_wendu&field=id,create_name,create_by,create_date,update_name,update_by,update_date,sys_org_code,sys_company_code,bpm_status,wendu_dd,wendu_cjsj,wendu_zhi,wendu_bz,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        wd=requests.post(url=url,headers=headers)
        print(wd.json())

    #进货延迟示警(接口响应问题)
    def test_cangchu_06_ycsj(self):
        url='http://10.59.9.32/jeewms/cgReportController.do?datagrid&configId=IMJHYSYJ'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        ycsj = requests.post(url=url, headers=headers)
        print(ycsj.json())

    #客户报表
    #客户库存
    def test_cangchu_07_kc(self):
        url='http://10.59.9.32/jeewms/mvStockCusController.do?datagrid&field=id,kuctype,goodsId,shpBianmakh,shpMingCheng,goodsQua,goodsUnit,baseGoodscount,zhongLiang,baseUnit,cusCode,zhongWenQch,goodsProData,bzhiQi,dqr,hiti,kuWeiLeiXing,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        kc=requests.post(url=url,headers=headers)
        print(kc.json())

    # #查询
    # def test_cangchu_08_cx(self):
    #     url='http://10.59.9.32/jeewms/mvStockCusController.do?datagrid&field=id,id_begin,id_end,kuctype,goodsId,shpBianmakh,shpMingCheng,goodsQua,goodsQua_begin,goodsQua_end,goodsUnit,goodsUnit_begin,goodsUnit_end,baseGoodscount,baseGoodscount_begin,baseGoodscount_end,zhongLiang,zhongLiang_begin,zhongLiang_end,baseUnit,baseUnit_begin,baseUnit_end,cusCode,zhongWenQch,zhongWenQch_begin,zhongWenQch_end,goodsProData,bzhiQi,bzhiQi_begin,bzhiQi_end,dqr,dqr_begin,dqr_end,hiti,hiti_begin,hiti_end,kuWeiLeiXing,kuWeiLeiXing_begin,kuWeiLeiXing_end,'
    #     headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
    #     cx = requests.post(url=url, headers=headers)
    #     print(cx.json())

    #效期预警
    def test_cangchu_08_yj(self):
        url='http://10.59.9.32/jeewms/mvStockYjController.do?datagrid&field=id,kuctype,goodsId,shpBianmakh,shpMingCheng,baseGoodscount,baseUnit,cusCode,zhongWenQch,goodsProData,bzhiQi,dqr,resDate,guoqiBili,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        yj = requests.post(url=url, headers=headers)
        print(yj.json())

    #手工温度报表
    def test_cangchu_09_wdb(self):
        url='http://10.59.9.32/jeewms/cgReportController.do?datagrid&configId=wm_wendubb'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        wdb = requests.post(url=url, headers=headers)
        print(wdb.json())

    #基础资料
    #客户
    def test_cangchu_10_user(self):
        url='http://10.59.9.32/jeewms/mdCusController.do?datagrid&field=id,createName,createBy,createDate,updateName,updateBy,updateDate,sysOrgCode,sysCompanyCode,zhongWenQch,zhuJiMa,keHuJianCheng,keHuBianMa,keHuYingWen,zengYongQi,zengYongQiYe,keHuZhuangTai,xingYeFenLei,keHuDengJi,suoShuXingYe,shouQianRiQi,zhongZhiHeShiJian,shenQingShiJian,keHuShuXing,guiShuZuZh,guiShuSheng,guiShuShiDai,guiShu,diZhi,youZhengBianMa,zhuLianXiRen,dianHua,shouJi,chuanZhen,zhuLianXiRen1,dianHua1,emaildiZhi,wangYeDiZhi,faRenDaiBiao,faRenShenFen,zhuCeZiJin,biBie,yingYeZhiZhao,shuiWuDeng,zuZhiJiGou,daoLuYunShu,zhuYingYeWu,heYiXiang,piZhunJiGuan,piZhunWenHao,zhuCeRiQi,beiZhu,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        user = requests.post(url=url, headers=headers)
        print(user.json())

    #商品明细
    def test_cangchu_11_goods(self):
        url='http://10.59.9.32/jeewms/cgReportController.do?datagrid&configId=mv_goods'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        goods = requests.post(url=url, headers=headers)
        print(goods.json())

    #供应商
    def test_cangchu_12_shop(self):
        url='http://10.59.9.32/jeewms/mdSupController.do?datagrid&field=id,createName,createBy,createDate,updateName,updateBy,updateDate,sysOrgCode,sysCompanyCode,zhongWenQch,zhuJiMa,gysJianCheng,gysBianMa,gysYingWen,zengYongQi,zengYongQiYe,gysZhuangTai,xingYeFenLei,gysDengJi,suoShuXingYe,shouQianRiQi,zhongZhiHeShiJian,shenQingShiJian,gysShuXing,guiShuZuZh,guiShuSheng,guiShuShiDai,guiShu,diZhi,youZhengBianMa,zhuLianXiRen,dianHua,shouJi,chuanZhen,emaildiZhi,wangYeDiZhi,faRenDaiBiao,faRenShenFen,zhuCeZiJin,biBie,yingYeZhiZhao,shuiWuDeng,zuZhiJiGou,daoLuYunShu,zhuYingYeWu,heYiXiang,piZhunJiGuan,piZhunWenHao,zhuCeRiQi,beiZhu,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        shop = requests.post(url=url, headers=headers)
        print(shop.json())

    #商品
    def test_cangchu_13_good(self):
        url='http://10.59.9.32/jeewms/mdGoodsController.do?datagrid&field=id,createName,createBy,createDate,updateName,updateBy,updateDate,sysOrgCode,sysCompanyCode,suoShuKeHu,shpMingCheng,ywMingCheng,rwMingCheng,shpJianCheng,shpBianMa,shpBianMakh,shpXingHao,shpGuiGe,shpYanSe,chpShuXing,categoryCode,cfWenCeng,chlKongZhi,mpDanCeng,mpCengGao,jfShpLei,shpPinPai,shpTiaoMa,ppTuPian,bzhiQi,zhlKgm,shlDanWei,jshDanWei,tiJiCm,zhlKg,chlShl,jtiJiBi,jmZhongBi,jjZhongBi,chcDanWei,chDanPin,kuDanPin,gaoDanPin,chZhXiang,kuZhXiang,gaoZhXiang,sku,shpMiaoShu,zhuangTai,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        good = requests.post(url=url, headers=headers)
        print(good.json())

    #第三方客户
    def test_cangchu_14_sfuser(self):
        url='http://10.59.9.32/jeewms/mdCusOtherController.do?datagrid&field=id,suoShuKeHu,zhongWenQch,zhuJiMa,keHuJianCheng,keHuBianMa,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        sfuser = requests.post(url=url, headers=headers)
        print(sfuser.json())

    #RFID
    def test_cangchu_15_rfid(self):
        url='http://10.59.9.32/jeewms/rfidBuseController.do?datagrid&field=id,createName,createBy,createDate,updateName,updateBy,updateDate,sysOrgCode,sysCompanyCode,bpmStatus,rfidType,rfidBuseno,rfidBusecont,rfidId1,rfidId2,rfidId3,'
        headers = {'cookie': 'JSESSIONID=B98178140A7FD783F816B268027551C2; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=1990'}
        rfid = requests.post(url=url, headers=headers)
        print(rfid.json())


#执行
if __name__ == '__main__':
    unittest.main()